package com.appspot.thinkhea;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

public class PictureCounter extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getWindow().setBackgroundDrawableResource(R.drawable.bg);
		setTitleColor(R.color.color_white);
		setContentView(R.layout.main);
	}

	// add Button handler
	public void myClickHandler(View view) {
		Intent myIntent = null;
		switch (view.getId()) {
		case R.id.Btn_Add:
			Toast.makeText(PictureCounter.this, R.string.desc_add_picture, Toast.LENGTH_SHORT)
					.show();
			myIntent = new Intent(PictureCounter.this, PanelEditPlayer.class);
			setCurrentActivityTo(myIntent);
			break;
		case R.id.Btn_Count:
			Toast.makeText(PictureCounter.this, R.string.desc_record_list, Toast.LENGTH_SHORT)
					.show();
			myIntent = new Intent(PictureCounter.this, PanelListRecord.class);
			setCurrentActivityTo(myIntent);
			break;
		case R.id.Btn_Random:
			Toast.makeText(PictureCounter.this, R.string.desc_random_picture, Toast.LENGTH_SHORT)
					.show();
			myIntent = new Intent(PictureCounter.this, PanelSelectRandomFormat.class);
			setCurrentActivityTo(myIntent);
			break;
		}
	}

	private void setCurrentActivityTo(Intent myIntent) {
		PictureCounter.this.startActivity(myIntent);
	}
}